﻿using System;

namespace calculator
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入首个操作数");
            int i = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("请输入第二个操作数");
            int j = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("请输入操作符");
            char op = Convert.ToChar(Console.ReadLine());
            Console.Write("{0}{2}{1}=",i,j,op);


            switch (op)
            {
                case '+':
                    Console.WriteLine(i+j);
                    break;
                case '-':
                    Console.WriteLine(i - j);
                    break;
                case '*':
                    Console.WriteLine(i*j);
                    break;
                case '/':
                    if(j!=0)
                    Console.WriteLine(i/j);
                    else
                        Console.WriteLine("无效的输入");
                    break;
                default:
                    Console.WriteLine("无效的输入");
                    break;
            }


        }
    }
}